package com.testsoap;
import java.util.Hashtable;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

public class Serie implements KvmSerializable
{
	public int id;
	public String nombre;
	public String actores;
	public String dia_semana;

	public Serie(){
	
	}
	
	public Serie(int id, String nombre, String actores, String dia_semana) {
		this.id=id;
		this.nombre=nombre;
		this.actores=actores;
		this.dia_semana=dia_semana;	
	}
	
	public Object getProperty(int arg0) {
        
        switch(arg0)
        {
        case 0:
            return id;
        case 1:
            return nombre;
        case 2:
            return actores;
        case 3:
        	return dia_semana;
        }
        return null;
    }
	
	public int getPropertyCount() {
        return 4;
    }
	
    public void getPropertyInfo(int index, Hashtable arg1, PropertyInfo info) {
        switch(index)
        {
        case 0:
            info.type = PropertyInfo.INTEGER_CLASS;
            info.name = "id";
            break;
        case 1:
            info.type = PropertyInfo.STRING_CLASS;
            info.name = "nombre";
            break;
        case 2:
            info.type = PropertyInfo.STRING_CLASS;
            info.name = "actores";
            break;
        case 3:
            info.type = PropertyInfo.STRING_CLASS;
            info.name = "dia_semana";
            break;   
        default:break;
        }
    }

    public void setProperty(int index, Object value) {
        switch(index)
        {
        case 0:
            id = Integer.parseInt(value.toString());
            break;
        case 1:
            nombre = value.toString();
            break;
        case 2:
            actores = value.toString();
            break;
        case 3:
        	dia_semana = value.toString();
        default:
            break;
        }
    }
}